home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gekikoh Dennoh Club 2
/
Gekikoh Dennoh Club Vol. 2 (Japan).7z
/
Gekikoh Dennoh Club Vol. 2 (Japan) (Track 01).bin
/
tools
/
ldpcx04
/
ldpcx04s.lzh
/
TONEDOWN.S
< prev
Wrap
Text File
|
1996-04-07
|
2KB
|
111 lines
*********************************************************************************
* トーンの変更 *
*********************************************************************************
.include doscall.mac
.include iocscall.mac
.include myconst.h
.xdef _Tone_up
.xdef _Tone_down
.xref v_wait
*****************************************************************
* トーン戻す *
*****************************************************************
_Tone_up:
movem.l d1/a1-a2,-(sp)
move.l #$e82400,a1 *色モードを調べる
move.w (a1),d1
andi.w #$0003,d1
cmp.w #1,d1
bcs up16
beq up256
bra up64k
up16:
move.w #16/2-1,d1
bsr pal_up
bra tone_up9
up256:
move.w #256/2-1,d1
bsr pal_up
bra tone_up9
up64k:
move.l #$e82600,a1
andi.w #$00ff,(a1) *半透明オフ
* bra tone_up9
tone_up9:
movem.l (sp)+,d1/a1-a2
rts
pal_up:
bsr v_wait
lea.l gpal_buff(pc),a1
movea.l #GPAL,a2
pal_up1:
move.l (a1)+,(a2)+
dbra.w d1,pal_up1
rts
*****************************************************************
* トーン落とし *
*****************************************************************
_Tone_down:
movem.l d1-d7/a1-a2,-(sp)
move.l #$e82400,a1 *色モードを調べる
move.w (a1),d1
andi.w #$0003,d1
cmp.w #1,d1
bcs down16
beq down256
bra down64k
down16:
move.w #16-1,d1
bsr pal_down
bra tone_down9
down256:
move.w #256-1,d1
bsr pal_down
bra tone_down9
down64k:
move.l #$e82600,a1
ori.w #$1b00,(a1) *半透明オン(参考:JPEGED.R)
* bra tone_down9
tone_down9:
movem.l (sp)+,d1-d7/a1-a2
rts
pal_down:
movea.l #GPAL,a1
lea.l gpal_buff(pc),a2
move.w #%0000_0000_0011_1100,d5
move.w #%0000_0111_1000_0000,d6
move.w #%1111_0000_0000_0000,d7
pal_down1:
move.w (a1),d2
move.w d2,(a2)+
move.w d2,d3
move.w d2,d4
and.w d5,d2
and.w d6,d3
and.w d7,d4
lsr.w #1,d2
lsr.w #1,d3
lsr.w #1,d4
or.w d3,d2
or.w d4,d2
move.w d2,(a1)+
dbra.w d1,pal_down1
rts
*****************************************************************
* ワークエリア *
*****************************************************************
.bss
.even
gpal_buff:
.ds.w 256
.even